@import 'bootstrap.css';
@import (less) "font-awesome.css";
@import (less) 'iconfont.css';
@primary: #337ab7;
@themeColor: #464c5b;
@themeColor-light: lighten(@themeColor, 8%);
@themeColor-dark: darken(@themeColor, 3%);
body {
  * {
    border-radius: 0 !important;
    font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '微软雅黑', Arial, sans-serif;
  }
  .btn {
    border-radius: 4px !important;
  }
}

.menu {
  padding-left: 0;
}

.col-md-9.col-md-offset-3 {
  padding-right: 0;
}

//顶栏
.navbar {
  margin-bottom: 0;
  background-color: @themeColor;
  border-color: @themeColor;
  //logo
  .navbar-brand {
    color: #fff !important;
    &:hover {
      color: #fff !important;
    }
  }
  //下拉菜单
  .navbar-nav > li > a {
    color: #fff !important;
    &:hover {
      color: #ddd !important;
    }
  }
  &.nav-fix {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    border-bottom: 1px solid @themeColor-light;
  }
}

//面包屑
#path-bar {
  position: absolute;
  width: 100%;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #ddd;
  margin-bottom: 15px;
  padding: 0;
  transition: all .2s;
  li {
    .disable {
      opacity: .2;
      cursor: not-allowed;
    }
    a {
      display: block;
      position: relative;
      line-height: 40px;
      padding: 0 10px;
      color: #999;
      transition: all .2s;
      &:hover {
        text-decoration: none;
      }
      &.active {
        font-weight: bold;
        color: @themeColor;
      }
      &.active:after {
        content: '';
        position: absolute;
        height: 2px;
        bottom: -1px;
        width: 100%;
        background: @themeColor;
        left: 0;
      }
    }
    a[href]:hover {
      background: #f5f5f5;
    }
  }
  li:first-child {
    margin-left: 6px;
  }
  li + li:before {
    padding: 0;
    content: "";
  }
  //固定
  &.path-bar-fixed {
    position: fixed;
    top: 0;
    background: rgba(255, 255, 255, .95);
    //background: @themeColor;
    a {
      //padding: 0 15px;
      //line-height: 45px;
      &.active {
        //color: #fff;
        //background: @themeColor-light;
      }
      &.active:after {
        //height: 3px;
      }
    }
    a[href]:hover {
      //background: @themeColor-light;
    }
  }
  //禁用
  &.cant {
    a {
      opacity: .2;
      cursor: not-allowed;
      &:hover {
        background: transparent;
      }
    }
  }
}

.config-nav {
  .list-group-item.normal {
    border-top: 0;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: @themeColor;
    i {
      font-size: 18px;
      line-height: 20px;
      width: 20px;
      text-align: center;
      margin-right: 8px;
    }
  }
  .list-group-item.title {
    background: #f5f5f5;
    color: #aaa;
    border-top: 1px solid #ddd;
    //padding-left: 12px;
    i {
      font-size: 18px;
      line-height: 20px;
      width: 20px;
      text-align: center;
      margin-right: 8px;
    }
  }
  .list-group-item.normal.sel {
    font-weight: bold;
    color: @primary;
    i {
      font-weight: normal;
    }
  }
  .list-group-item.title + .list-group-item {
    border-top: 1px solid #e7e7e7;
  }
}

//固定导航位置
.menu {
  position: absolute;
  width: 263px;
  &.menu-fixed {
    position: fixed;
    top: 53px;
  }
}

.cantMenu {
  * {
    color: #ddd !important;
    cursor: not-allowed;
  }
  a:hover {
    background: #fff;
  }
  a.sel {
    color: #fff !important;
    //color: @themeColor !important;
    //background: #eee;
  }
}

//需要选中的表格
.table-need-sel {
  tr {
    cursor: default;
    &:first-child:hover {
      background: transparent;
    }
    &:hover {
      background-color: #eee;
    }
    &.active {
      background-color: #eee;
      border-left: 3px solid @primary;
      td {
        background-color: #eee !important;
        color: @primary;
      }
      td:first-child {
        font-weight: bold;
      }
    }
  }
}

//上/下一步
.step-btn {
  @width: 54px;
  position: fixed;
  top: 46%;
  width: @width;
  height: @width;
  text-align: center;
  border: 2px solid #eee;
  border-radius: @width/2 !important;
  cursor: pointer;
  transition: all .2s;
  &:hover {
    background: #eee;
    text-decoration: none;
  }
  &.left {
    left: @width/2;
    &:hover {
      border-color: #888;
    }
    .iconfont {
      color: #888;
    }
  }
  &.right {
    right: @width/2;
    &:hover {
      border-color: @primary;
    }
    //处于加载状态的下一步
    &.loading {
      .iconfont {
        color: #ddd !important;
      }
      &:hover {
        background: transparent;
        border-color: #ddd;
        cursor: not-allowed;
      }
      &:after {
        content: '';
        position: absolute;
        top: -2px;
        right: -2px;
        bottom: -2px;
        left: -2px;
        border: 2px solid transparent;
        border-radius: @width/2 !important;
        border-left-color: @primary;
        -webkit-animation: loading 1s infinite linear;
        animation: loading 1s infinite linear;
        @keyframes loading {
          0% {
            transform: rotate(0deg);
          }
          100% {
            transform: rotate(360deg);
          }
        }
        @-webkit-keyframes loading {
          0% {
            -webkit-transform: rotate(0deg);
          }
          100% {
            -webkit-transform: rotate(360deg);
          }
        }
      }
    }
  }
  .iconfont {
    font-size: 24px;
    line-height: @width+(-2);
  }
}

//闪烁
@-webkit-keyframes twinkling {
  /*透明度由0到1*/
  0% {
    opacity: 0;
    /*透明度为0*/
  }
  30% {
    opacity: 1;
    /*透明度为1*/
  }
  70% {
    opacity: 1;
    /*透明度为1*/
  }
  100% {
    opacity: 0;
    /*透明度为0*/
  }
}

@keyframes twinkling {
  /*透明度由0到1*/
  0% {
    opacity: 0;
    /*透明度为0*/
  }
  30% {
    opacity: 1;
    /*透明度为1*/
  }
  70% {
    opacity: 1;
    /*透明度为1*/
  }
  100% {
    opacity: 0;
    /*透明度为0*/
  }
}

.shine {
  -webkit-animation: twinkling 1s infinite ease-in-out;
  animation: twinkling 1s infinite ease-in-out;
}

//日志
#console, .console {
  .modal-header {
    padding: 10px;
    h4 {
      font-size: 14px;
      font-weight: bold;
    }
  }
  .modal-body {
    padding: 10px;
  }
  .load-tip {
    line-height: 2em;
    height: 2em;
    text-align: center;
    color: #aaa;
  }
  .log-panel {
    background: #eee;
  }
  .line-num {
    float: left;
    display: inline-block;
    min-width: 2.8em;
    text-align: right;
    color: #aaa;
    height: 20px;
  }
  .log {
    margin-left: 3.2em;
    padding-left: .4em;
    background: #fff;
    min-height: 20px;
    word-wrap: break-word;
  }
}


/*提示*/

.tip-panel {
  display: none;
  position: fixed;
  bottom: -18px;
  width: 100%;
  text-align: center;
  z-index: 9999;
  opacity: 0;
}

.tip {
  display: inline-block;
  padding: 16px 20px !important;
  margin-bottom: 0 !important;
  border-bottom-width: 0;
  border-radius: 6px 6px 0 0 !important;
  font-weight: bold;
}

.tip i {
  color: inherit;
  margin-right: 4px;
}

//禁止选中
.cantSel {
  -moz-user-select: none;
  /*火狐*/
  -webkit-user-select: none;
  /*webkit浏览器*/
  -ms-user-select: none;
  /*IE10*/
  -khtml-user-select: none;
  /*早期浏览器*/
  user-select: none;
}

.noTip {
  text-align: center !important;
  color: #aaa !important;
}

//主题
.config-nav .list-group-item.normal.sel {
  //border-left: 2px solid @themeColor;
  //color: @themeColor;
  background: @themeColor;
  color: #fff;
  font-weight: normal;
}

//接口包安装
#interface .list-group {
  margin-bottom: 0;
}

//分页
#installDB-compile-dialog .pagination {
  .disabled a {
    color: #aaa;
  }
  a {
    padding: 0;
    height: 34px;
    width: 34px;
    line-height: 34px;
    text-align: center;
    .cantSel;
  }
}

#installInterface .title a.disabled, #installDB .title a.disabled {
  cursor: not-allowed;
  color: #aaa;
  &:hover, &:focus, &:active {
    text-decoration: none;
  }
}

#installInterface table, #installDB table {
  margin: 0;
  tr {
    td {
      vertical-align: middle;
      border-top: 0;
      padding-top: 10px;
      padding-bottom: 0;
    }
    td:nth-child(3n+1) {
      width: 80px;
      max-width: 80px;
      padding-left: 0;
      padding-right: 0;
    }
    td:nth-child(3n) {
      text-align: right;
      min-width: 156px;
      width: 156px;
      padding-right: 0;
    }
  }
}

//顺序调整
.order-change {
  position: absolute;
  top: 0;
  left: -6px;
  bottom: 0;
  .glyphicon {
    position: absolute;
    left: 0;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
    &:hover {
      color: #444;
    }
  }
  .glyphicon-triangle-top {
    top: auto;
    bottom: 50%;
  }
  .glyphicon-triangle-bottom {
    top: 50%;
    bottom: auto;
  }
}

.pkgName {
  padding-left: 15px;
  &:hover {
    text-decoration: underline;
    cursor: pointer;
  }
}

//卡片
.card {
  word-wrap: break-word;
  margin-bottom: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  border-radius: 3px !important;
  font-family: monospace;
  &:last-child {
    margin-bottom: 0;
  }
}

.help-bg {
  position: fixed;
  top: 50px;
  bottom: 0;
  width: 100%;
  background: #eee;
  .help-bg-color {
    top: 0;
    height: 240px;
    width: 100%;
    border-top: 1px solid @themeColor-light;
    background: @themeColor;
  }
}

.help {
  position: relative;
  width: 1080px;
  margin: 0 auto;
  .help-content {
    position: absolute;
    margin: 80px 0 30px;
    width: 100%;
    height: 800px;
    background: #fff;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.14), 0 2px 2px 0 rgba(0, 0, 0, 0.098), 0 1px 5px 0 rgba(0, 0, 0, 0.084);
    //border-radius: 2px !important;
    .help-left {
      position: absolute;
      left: 0;
      width: 20%;
      height: 100%;
      border-right: 1px solid #e7e7e7;
      z-index: 50;
      .list-item {
        padding: 10px 15px;
        color: #000;
        font-weight: bold;
      }
      .list-item.sel {
        background: @themeColor-light;
        color: white;
      }
    }
    .help-right {
      position: absolute;
      right: 0;
      width: 80%;
      height: 100%;
      z-index: 40;
    }
  }
}

//消息中心
.msg-center {
  .badge {
    background: #ff5958;
    border-radius: 10px !important;
    color: #fff;
  }
  .msg-dropdown {
    width: 560px;
    padding: 0;
    .title {
      border-width: 0 0 1px 0;
    }
    .msg-panel {
      max-height: 400px;
      padding: 0 12px 0 24px;
      overflow: auto;
      background: #f5f5f5;
      border-top: 1px solid #ddd;
      .card-panel {
        padding: 12px 0;
        position: relative;
        &:before {
          content: "";
          position: absolute;
          width: 1px;
          background: #ddd;
          left: -13px;
          top: 0;
          height: 100%;
        }
      }
      .msg-content {
        padding: 6px 12px 12px;
        font-family: monospace;
      }
      .msg-sub {
        position: relative;
        padding: 6px 12px;
        border-bottom: 1px solid #eee;
        color: #aaa;
        overflow: visible;
        font-family: monospace;
      }
      .point {
        position: absolute;
        height: 7px;
        width: 7px;
        border-radius: 5px !important;
        background: #ff6260;
        top: 50%;
        left: -16px;
        margin-top: -3px;
        outline: #f5f5f5 solid 3px;
      }
    }
  }
}

@media (min-width: 0) {
  .col-md-9.col-md-offset-3 {
    margin-left: 25%;
    width: 75%;
    float: left;
  }
}

.import-pkgs {
  padding: 0 15px;
  max-height: 400px;
  overflow-y: auto;
  @pkg-height: 44px;
  .import-pkg {
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: -1px;
    cursor: pointer;
    &:hover {
      background: #e5e5e5;
    }
    &.sel {
      color: #fff;
      background: @themeColor;
    }
    .fa {
      float: left;
      line-height: @pkg-height;
      width: @pkg-height;
      text-align: center;
      font-size: 20px;
    }
    div {
      margin-left: @pkg-height;
      line-height: 24px;
      padding: 10px 0;
    }
  }
}

// 日志全屏
.log-full {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  .list-group-item.form-horizontal {
    position: absolute;
    top: 41px;
    right: 0;
    bottom: 0;
    left: 0;
    .console {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      height: auto !important;
    }
  }
}

.tooltip-inner {
  border-radius: 4px !important;
  text-align: left;
}

.platform-config {
  padding-left: 30px;
  cursor: pointer;
  &:hover {
    background: #eee;
  }
}